//
//  WtrackerAppDelegate.h
//  Wtracker
//
//  Created by Anna on 6/25/10.
//  Copyright __MyCompanyName__ 2010. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <sqlite3.h>

@interface WtrackerAppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *window;
	UINavigationController *nav;
	NSMutableDictionary *myDict;
	NSString *tmpDate;
	
	NSString *databaseName;
	NSString *databasePath;
	
	NSMutableArray *weights;
	NSArray *unitArray;

}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UINavigationController *nav;

@property (nonatomic, retain) NSString *databaseName;
@property (nonatomic, retain) NSString *databasePath;

@property (nonatomic, retain) NSMutableDictionary *myDict;
@property (nonatomic, retain) NSMutableArray *weights;
@property (nonatomic, retain) NSString *tmpDate;
@property (nonatomic, retain) NSArray *unitArray;

-(void)loadMySettings;
-(void)saveSettings;
-(void)moveFromOriginal:(NSInteger)indexOriginal toNew:(NSInteger)indexNew;
-(void)readWeightsFromDatabase;
-(void)checkAndCreateDatabase;
-(BOOL)logWeight:(float)aWeight logDate:(NSString *)aLogDate;
-(BOOL)removeFromList:(NSInteger)index;

+ (void) finalizeStatements;


@end

